<% web_form_shared_secret= Spree::BrontoConfiguration.account[current_store.code]['web_form_shared_secret']
   site_id= Spree::BrontoConfiguration.account[current_store.code]['site_id']
   preference_form_id= Spree::BrontoConfiguration.account[current_store.code]['preference_form_id']

   user_hash =OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), web_form_shared_secret, site_id + preference_form_id + @user.email)

   form_url= "http://app.bronto.com/public/webform/lookup/#{preference_form_id}/#{site_id}/manpref/#{@user.email}/#{user_hash}"
%>
<div class="bronto">

<h3>Manage my E-mail preferences</h3>
  <a target="_blank" href="<%= form_url%>">Click here to manage your email preferences.</a>

</div>

<script>
  $('#bronto_preferences').load(function(){$(this).height($(this).contents().outerHeight());});
</script>